﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace ManYan.Domain.DomainService
{
    public interface IBaseDomainService<T> where T : class
    {
        public  IEnumerable<T> LoadEntityEnumerable(Expression<Func<T, bool>> where, Expression<Func<T, DateTime?>> orderby, string asc, int pageIndex, int pageSize);
        public bool AddEntity(T entity);
        public T WhereLoadEntity(Expression<Func<T, bool>> where);

        int DelEntity(Expression<Func<T, bool>> where);

        public List<T> LoadEntityAll();

        public  int GetEntitiesCount(Expression<Func<T, bool>> where);

        public bool UpdateEntity(T entity);

    }
}
